package com.szd.qiongyou20.home.search.presenter;

import com.szd.qiongyou20.home.search.bean.JnBean;
import com.szd.qiongyou20.home.search.modle.LoadSearchData;
import com.szd.qiongyou20.home.search.modle.SearchData;
import com.szd.qiongyou20.home.search.modle.SearchJnListener;
import com.szd.qiongyou20.home.search.view.JnDataToView;

/**
 * Created by SZD on 2016/12/26.
 */

public class JnPre {

    private SearchData mSearchData;
    private JnDataToView mJnDataToView;
//    private String keyword;

    public JnPre(JnDataToView jnDataToView, String keyword) {
        mJnDataToView = jnDataToView;
        mSearchData = new LoadSearchData(keyword);
    }

    public void loadDataToView(){
        mSearchData.searchJnData(new SearchJnListener() {
            @Override
            public void searchSuccess(JnBean jnBean) {
                mJnDataToView.DataToView(jnBean);
            }

            @Override
            public void searchFaile(String string) {

            }
        });
    }
}
